home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-03-10 | 1.8 KB | 53 lines | [TEXT/KAHL] |
- Note for developpers:
- En Toutes Lettres™ use translators that are LGDF resources containing a single
- procedure : pascal void main(char *text,char *result);
- text is the original numeric string (C string) and result is a pointer on a chat buffer
- to be filled by the translator (C string).
- By convention, the ID of the LGDF resource "must" be the corresponding ID defined in the
- Inside Mac for the target language (US english = 0, French = , …)
-
- If the corresponding check box is active in the Control Panel Device the ETLE gestalt
- selector is intalled. When Gestalt is called with ETLE as the selector, result is set to
- a pointer on the GestaltInfo structure used by En Toutes Lettres.
- The fields must be considered READ ONLY. Modification of the fields directly by an application
- will NOT be reflected in the menu.
- This makes possible for any application to call the En Toutes Lettres translators.
- The GestaltInfo structure ends with a variable length array containing the information
- for each of the available translators.
-
- typedef pascal void (*LgdfProcPtr)(char *text,char *result) ;
-
- typedef struct TransInfo
- {
- short fIntlID ; /* ID of the translator */
- Str32 fName ; /* name of the translator == resource name */
- LgdfProcPtr fProc ; /* proc ptr on the code resource */
- }
- TransInfo ;
-
- /* fCurFormat values: */
- #define kCapitalize 4
- #define kUppercase 5
- #define kLowercase 6
-
- /* fCurEnding values: */
- #define kSpace 8
- #define kTabulation 9
- #define kCR 10
-
- typedef struct GestaltInfo
- {
- short fVersion ; /* currently 0x0100 */
- short fNTranslators ; /* the number of translators available */
- short fCurFormat ;
- short fCurEnding ;
- Boolean fDoFinancial ;
- Boolean fDoAutoReplace ;
- Boolean fEnable ; /* if the patches are enabled */
- TransInfo fTranslators[1] ;
- }
- GestaltInfo;
-
- typedef GestaltInfo *GestaltInfoPtr ;
-
-